public class NiceStop extends SuperPlugin {
	private static String name = "NiceStop";
	private static String version = "0.1";
	private static Server s = etc.getServer();
	
	public NiceStop() { super(name,version); }
	
	public boolean extraCommand(Player player, String[] split) {
		if (isApt("/stop", split[0], player)) {
			for(Player p : s.getPlayerList()) {p.kick("Emergency Stop Of Server. Please check thread for details.");}
			s.useConsoleCommand("save-on");
			wait(2);
			s.useConsoleCommand("save-all");
			wait(10);
			s.useConsoleCommand("stop");
			return true;
		}
		return false;
	}
		
	private void wait(int seconds) {
		try {
			Thread.sleep(seconds * 1000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
